<?php
/* sending e-mail with the order to the visitors email*/

$to
= $_POST['jcremite'];

$subject = 'Order copy from domain';

$jcitems = '<body style="background-color: #333333; none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;">
<table align="center" bgcolor="#ffffff" border="0" cellpadding="10" cellspacing="0" width="600"> 
<tbody>

<tr style="background-color: #333333">

<td bgcolor="#F3F3F3" style="margin: 4px; padding: 4px; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: center;">This email is a notification email because you or someone with your email have ordered products on our website <a href="'.$_POST['urlWebsite'].'">' .$_POST['businessName'].' </a><br /></td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="background-color: rgb(191, 49, 26);">
<table border="0" cellpadding="12" cellspacing="0" width="100%">
<tbody>
<tr>
<td colspan="1" rowspan="1" style="text-align: center;"><big style="color: white; font-family: Arial Black;"><big>ORDER INVOICE</big></big><span style="font-weight: bold; color: white; font-family: Times New Roman,Times,serif;">&nbsp;</span><br />
<small style="font-family: Verdana;"><span style="color: white; font-weight: bold;">Welcome To Our Online Store</span></small></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td align="center"><br />
</td>
</tr>
<tr>
<td align="center">
<table border="0" cellpadding="10" cellspacing="0" width="100%">
<tbody>
<tr>
<td valign="top" width="324">
<h1 style="font-family: Arial,Helvetica,sans-serif; font-size: 20px; padding-bottom: 2px; margin-bottom: 2px; margin-top: 7px; padding-top: 7px; color: rgb(191, 49, 26); text-align: left; font-weight: normal;">Hello '. $_POST['buyername'] . ', </h1>
<p style="margin: 0pt; padding: 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: left;">&nbsp;</p>
<p style="margin: 0pt; padding: 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: left;">Thank you for visiting and making a purchase at our Store '. $_POST['businessName'] . '</p>
<p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: left;">Here are the goods that you ordered from our website: :</p>
<table style="background-color: rgb(204, 0, 0); width: 324px;" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="text-align: center;"><span style="color: white; font-weight: bold;">YOUR ORDER </span>
</td>
</tr>
<tr style="background-color: rgb(204, 0, 0);">
<td style="background-color: rgb(238, 238, 238);">
<p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: left;">'. $_POST['jcitems'] . '</p>
</td>
</tr>
</tbody>
</table>
<p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: left;">Please make a note that: <b>The price does not include postage.</b>. We will contact you via SMS or EMAIL to inform the total cost that you have to transfer. Once you get a confirmation from us, please make payment via bank listed in the mode of payment box, and then do a confirmation in the following format:  :</p>
<table style="text-align: left; background-color: white; width: 321px; height: 100px;" border="0" cellpadding="10" cellspacing="2">
<tbody>
<tr style="color: black;">
<td style="background-color: rgb(204, 204, 204); "><p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: left;">'. $_POST['formatsmsKonfirmasi'] . '</span></p></td>
</tr>
<tr style="color: black;">
<td style="background-color: rgb(153, 153, 153);">
<p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: left;">
<strong>Example : </strong>'. $_POST['contohformatsmsKonfirmasi'] . '</p>
</td>
</tr>
<tr style="color: black;">
<td style="background-color: silver;">
<p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: left;">Then SMS me at: '. $_POST['noHP'] . '</span></small></p>
<p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: left;">or email me at email addres : <br>
'. $_POST['email'] . '</span></p>
</td>
</tr>
</tbody>
</table>
<p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: left;">Thank you for visting and shopping at our online Store '. $_POST['businessName'] . '</p>

<p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: left;">Please do not hesitate to tell others if you liked our products and services and tell us if the products were not of that quality which you expected or there were some faults in our services . Your feedback is important for us to grow high so be in touch and we are awaiting your next kind visit to our online store.</p>

<p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: left;">Regards :</p>
<p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: left;"><b>'. $_POST['businessName'] . '</b><br />
<span style="font-style: italic;">'. $_POST['urlWebsite'] . '</span></p>
<br/><br/><hr>
<p style="font-family: Arial,Helvetica,sans-serif; font-size: 10px; color: rgb(51, 51, 51); text-align: left;"></p>
<div style="text-align: center;"><p style="font-family: Arial,Helvetica,sans-serif; font-size: 18px; text-align: center;">ATTENTION!!</p>
<p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: center;">Be carefull before buying, goods bought once can not be exchanged or refunded
<br /></div>
</td>
<td valign="top">
<table style="padding-top: 5px; margin-top: 5px;" border="0" cellpadding="10" cellspacing="0" width="100%">
<tbody>
<tr>
<td align="center" style="border-left: 2px solid rgb(191, 49, 26);"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-weight: bold;">Your personal data<br />--------------------------------------</span><br />
<big><font size="-2"><big><span style="font-weight: bold;"></span></big></font></big></span>
<table style="text-align: center; width: 100%;" border="0" cellpadding="5" cellspacing="2">
<tbody>
<tr>
<td style="background-color: rgb(204, 204, 204);"><p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: center;"><strong>Name : </strong><br />
'. $_POST['buyername'] .' </p></td>
</tr>
<tr align="center">
<td style="background-color: rgb(228, 228, 228);"><p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: center;"><strong>Email:</strong><br />
'. $_POST['jcremite'] . '</p></td>
</tr>
<tr align="center">
<td style="background-color: silver;"><p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: center;"><strong>Address:</strong><br />
'. $_POST['buyeralamat'] . '</p></td>
</tr>
<tr align="center">
<td style="background-color: rgb(228, 228, 228);"><p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: center;"><strong>Phone Number : </strong><br /> 
'. $_POST['buyerhp'] . '</p></td>
</tr>
<tr>
<td style="background-color: rgb(204, 204, 204);"><p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: rgb(51, 51, 51); text-align: center;"><strong>Penawaran : </strong><br />
'. $_POST['nego'] .' </p></td>
</tr>
</tbody>
</table>
<span style="font-family: Arial,Helvetica,sans-serif;"><big><font size="-2"><big><br />
</big></font></big></span></td>
</tr>
</tbody>
</table>
<br />
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="background-color: rgb(191, 49, 26);">
<h2 style="margin: 8px 8px 0pt; padding: 8px 8px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 15px; color: rgb(255, 255, 255); font-weight: bold; text-align: center;"><big>Mode of Payment
</big><br />
</h2>
<p style="margin: 0pt 8px 8px; padding: 0pt 8px 8px; font-family: Arial,Helvetica,sans-serif; font-size: 12px; color: rgb(255, 255, 255); text-align: center;">You can make a payment through any of the following banks&nbsp;</p>
<p style="margin: 0pt 8px 8px; padding: 0pt 8px 8px; font-family: Arial,Helvetica,sans-serif; font-size: 12px; color: rgb(255, 255, 255); text-align: center;">----------------------------------------------</p>

<p style="margin: 0pt 8px 8px; padding: 0pt 8px 8px; font-family: Arial,Helvetica,sans-serif; font-size: 12px; color: rgb(255, 255, 255); text-align: center;"><big><span style="font-weight: bold;">'. $_POST['akunbank1'] . '</span></big><br />'. $_POST['namarek1'] . '<br />'. $_POST['norek1'] . '</p>
<p style="margin: 0pt 8px 8px; padding: 0pt 8px 8px; font-family: Arial,Helvetica,sans-serif; font-size: 12px; color: rgb(255, 255, 255); text-align: center;"><big><span style="font-weight: bold;">'. $_POST['akunbank2'] . '</span></big><br />
'. $_POST['namarek2'] . '<br />
'. $_POST['norek2'] . '</p>
<p style="margin: 0pt 8px 8px; padding: 0pt 8px 8px; font-family: Arial,Helvetica,sans-serif; font-size: 12px; color: rgb(255, 255, 255); text-align: center;"><big><span style="font-weight: bold;">'. $_POST['akunbank3'] . '</span></big><br />
'. $_POST['namarek3'] . '<br />
'. $_POST['norek3'] . '</p>
<p style="margin: 0pt 8px 8px; padding: 0pt 8px 8px; font-family: Arial,Helvetica,sans-serif; font-size: 12px; color: rgb(255, 255, 255); text-align: center;"><big><span style="font-weight: bold;">'. $_POST['akunbank4'] . '</span></big><br />
'. $_POST['namarek4'] . '<br />
'. $_POST['norek4'] . '</p>
<p style="margin: 0pt 8px 8px; padding: 0pt 8px 8px; font-family: Arial,Helvetica,sans-serif; font-size: 12px; color: rgb(255, 255, 255); text-align: center;"><big><span style="font-weight: bold;">'. $_POST['akunbank5'] . '</span></big><br />
'. $_POST['namarek5'] . '<br />
'. $_POST['norek5'] . '</p>
<p style="margin: 0pt 8px 8px; padding: 0pt 8px 8px; font-family: Arial,Helvetica,sans-serif; font-size: 12px; color: rgb(255, 255, 255); text-align: center;"><big><span style="font-weight: bold;">'. $_POST['akunbank6'] . '</span></big><br />
'. $_POST['namarek6'] . '<br />
'. $_POST['norek6'] . '</p>
</td>
</tr>
</tbody>
</table>



</td>


</tr>

</tbody>

</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%">

<tbody>


<tr>


<td>

</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr style="background-color: rgb(106, 104, 102);">
<td>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>

<tr style="font-family: Arial,Helvetica,sans-serif; font-size: 11px; color: rgb(255, 255, 255); text-align: center;">

<td colspan="1" rowspan="1"><p>Thanks again for your kind visit to : <em><strong>OUR ONLINE STORE</strong></em><br />
<p style="margin: 4px 0pt; padding: 4px 0pt; font-family: Arial,Helvetica,sans-serif; font-size: 12px; line-height: 18px; color: orange; text-align: left;">* Do you have any questions? then please do not hesitate emailing me at '. $_POST['email'] . '</p><br />

<a href="'. $_POST['urlWebsite'] . '" style="color: white;"><strong>&gt;&gt;LINK TO OUR ONLINE STORE : '. $_POST['businessName'] . '  &lt;&lt;</strong></a><br />

</span></td>

</tr>
</tbody>
</table>
</td>
</tr> </tbody></table></body>';
$headers = 'From: ' . $_POST['businessName'] . '<' . $_POST['email'] . '>'."\r\n" ;

'Reply-To:' . $_POST['email'] . "\r\n" ;
$headers .= 'MIME-Version: 1.0' . "\r\n";   $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
mail($to, $subject, $jcitems, $headers); 


// /* sending e-mail to the shop email */   
$to
= $_POST['email'];  $subjectAdmin = 'NEW ORDER';    $jcitemsAdmin = '<html><body>Hello Admin, there was a visitor at your online store <b>' . $_POST['businessName'] . '</b><br/><br/> Here are the goods ordered by the visitor :<br/>' . $_POST['jcitems'] . '<br/>    <br/>Here is the brief data of the visitor :   <br/>===============================================    <br/>Email : ' . $_POST['jcremite'] . '<br/>Name : ' . $_POST['buyername'] .    '<br/>Address :'. $_POST['buyeralamat'] . '<br/>Phone Number : '. $_POST['buyerhp'] . '<br/>===============================================  <br/><br/> It is suggested that you contact your customers via EMAIL and SMS to inform them about TOTAL cost to be transferred (including postage), do not wait until they are contact you first, because more than 60% of visitors are passive consumers and window shoppers . Therefore we recommend  you  to send SMS or / and EMAIL to visitors. 

<br/><br/>Have a nice day!</body></html>';  $headers = 'From: visitors email <'.$_POST['jcremite'].'>'."\r\n" ;

'Reply-To:' . $_POST['jcremite'] . "\r\n" ; $headers .= 'MIME-Version: 1.0' . "\r\n";   $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
mail($to, $subjectAdmin, $jcitemsAdmin, $headers);


/*Clearing the cart info after succesfull order is made*/

setcookie ("simpleCart", "", time() - 3600);

header('location:' . $_SERVER['HTTP_REFERER'].'p/www.grandauctionbid.com/p/terima-kasih.html');

die;

?>